package com.zhuoyue.biz.core.api.dto.req;

import com.zhuoyue.common.group.ValidationGroups;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;

/**
 * @author wjming
 * @ClassName: RoomReqDTO
 * @Description: 房间请求对象
 * @Date 2021-07-02 11:16
 */
@Data
public class RoomReqDTO {
    /**
     * 房间ID
     */
    @NotBlank(message = "id不能为空", groups = {ValidationGroups.Update.class})
    @Size(max = 40)
    private String id;
    /**
     * 家庭ID
     */
    @NotBlank(message = "家庭ID不能为空", groups = {ValidationGroups.Insert.class})
    @Null(groups = {ValidationGroups.Update.class})
    private String homeId;
    /**
     * 房间名称
     */
    @Size(max = 15, message = "房间名称最大为15个字符")
    @NotBlank(message = "名称不能为空", groups = {ValidationGroups.Insert.class})
    private String name;
    /**
     * 房间图片
     */
    @Size(max = 200, message = "房间路径最大为200")
    @NotBlank(message = "图片不能为空", groups = {ValidationGroups.Insert.class})
    private String imgUrl;
}
